Add create event and view event function

@yzhang29