xToInt now handles multiple digits