Updated Matthias' calcPxCov 2