make reset button work