make re-search more efficient