added reset code to end of string