updated get documents onUpdate handler