prevented to move outside the map
moving update