fixed the standard deviation method