Added reset() function