Refactoring reset() method