added function to create a new event and add it to the list