changed the use of atof to a separate function stringToFloat that uses a specific locale