tries to take the right actions in case of leg changes - needs more tests (functionality working but tests are broken)