add click event to save button