Added stringToInt function