tested and cleaned up calendar example