added state machine for game states