Updated Calendar code