receive function changed to class