more calendar refactoring