rewrite pdw parser