delegate refactoring