Modified code to use iCalendar package