added close function to the save button