Search working. Need to make thread safe