replaced pow(x, 2) with x*x