refactored move_up/move_down