rewrote search