rewrite model parser