Added movedirection atomic parameter