finish reset button function