creating the save event and modifying the html structure