implemented game state tracking