added reset function and push button output