update insert element method