decoupled calendar  code