Improved generic receiver function