refactored sender