initial thought is to recursively divide by 10 rather than convert back to a string