returns empty array when there are no words to search for