working for yabbadabbado recursively
figured out a bug when r_prime contains value more than 9
preparing to make major changes