CHANGED:applied the reset() function;