Added createEvent for making custom events.