refactored mtf, psf - fixed cpd calc