convert input string to numeric