updated method to use a receiver