added state argument to send_to* and relay_publish functions (prepare to event observing)