refactor movement logic into the classes