added initial rewrite support.