fixed the corr.r code