some tweaking of pair correlation function