Refactored code for receiver variables