Avoiding the switch of move() function