handles complex single digit case
double digit input