some code which deals with google calendar api