more memory efficient PD calculation