Replaced pow(...,.5) with sqrt(...)