use getNextWord from lecture, use readFile from SO