Spearman's code corrected