Included unit test codes.
Need to test loops in RD before moving on