introduces pair_data, a refactoring of some of the functionality of top_words