code update for word search.