generalize receive_push to receive_event, move require statement to top