optimize search speed