changed reset function and showResult  functio