added rewrite statement