string to float method for values