refactored calendar_library