added a new insert funciton