Added reset function