refactoring coge