updated update and added print in insert