refactored game server