Adding Pair and Rank classes