changed the movement functions