Glad you’re making progress! From experience, on this forum it is most useful and efficient to state the exact problem you want to solve. In this case, if your end-goal was to end up with numbers as strings, great! But it seems like that wasn’t the case, and the whole procedure ended up taking a different turn…
This post (and your other one about divrem) seem like a case of the XY problem. So it’s best to just as for what you really want, rather than what you think will take you further on the path to what you really want.
Just my two cents!