updated parser for escapes