changed the calendar object to be provided by a factory