refactored delegate