making a move logic