added events and changed to csv