added correlFuncs ...beginning to clean up the correlation part of the code