first implementation on dag support

test included