I think you don't need Math.pow(, 0.5) as we only care their relative difference.