first implementation on dag support