Changed the search function so that it now can check for substrings