refactor reset method