quick search rewrite