move ical stuff to a helper