Creating a random dag generator.

needs to be tested.