made insert iterative