wrote collection querying, collection update, logic for auto updating on Document.update, set up Document class