breaks if some of the words are empty