move the save out to the view