Added resetValues() function for reseting variables to initial values