refactoring cuuk