Add functionality to save button.