adding mean subtraction to the correlation calculation