Added a solution for the time limit imposed by the GDocs Scripting environmnet