refactoring old coe