reset button functionality done