added the calendar helper function
calendar class and delegate function