replace incorrect atol() with atof()