adds event publishing