what's the purpose of calling doc.getValue() here?