avoid using math.Pow; using **4 instead (thanks to tip from Michael Jones)