Added create event functionality.