Adding wordsearch logic