update of insert.cpp