Working on writing new events to db