simplified reset code