fixed calcruns, still a few problems with calcPairs