Created correlation function in calculations library