gdocs assignment algorithm