refactoring using delegator