implemented the calendar functions