update calendar code