refactors finding documents
refactors updateing documents
refactoring