more refactoring - finished locomotion