rewrite search app