made insert and merge