Added some function in event model.