added reset button and did output debugging