added rack rewrite