refactor game loading