refactor game name functionality