copy calendar code from project