don't use pow(x,2.0)
use x*x 
pow is abou a hundred times slower