added the ability to add new events

+ fixed bugs