add function to add events from calendar
add debug code