insert function from save button should now be working