update before improving the efficiency of the psf calculation