Do this in line 71, as soon as you have 'words' so that you are not doing unnecessary computations