completed createEvent method