reweite rule added with an if stmt