added reset button and logic