adding a test to check nodes and dag