fixed runSearch so that it tests