Update to work with new events API