update insert method