Updated the covariance calculator to work on user supplied clusters