pair counting was wrong by 3 times too many