Modifying the move function