update direction move