added rewritecond