Added stringToNumber function