refactor global game object