copied all code from Google Docs