working on psf flux
added profiling