stops searching for adjacent words when target has been found