Created addEvent and getAllEvents method