generalize wordslist visualization algorithm to work on different wordslists following the same pattern