made InsertObject smarter