updated macro receive_event