refactor all the event backends