Refactored motion()