search algorithms fixed!