refactor get calendars