refactored receiver part