updated save feature for form