experimenting with using rational to decimal in the algorithms