assumption that last word is defined removed, data structure preserved with empties
extra check added