Adding reset() functionality