create event class , added some changes.