Your second code is much easier to understand, thank you!
In reply to Re^2: Word density by Anonymous Monk in thread Word density by Anonymous Monk