Added save button function.