changed the work_listener to send events to the api