refactor_gym