Refactored to add numberOfMoves