refactor games_controller