need to handle valid data entry when clicked saved