Added the stringToNumber function