updte code - add validation for showing reset button