wire up insertDocument