Wrote the getWordLine method.