changed %g to %f in printf's so that scientific notation isn't printed