added readfloat function