added comments to correlate.R