modify insert() function in string head file