getting pair correlation function working