working version of adding and getting events into the calendar