adding the code for tet insert