Added reset code