corrected the hasOption in calculatecorrelation