refactored dag computer

Change-Id: I4c2cb3b89dff2fab3bb61361bd3d07ec1c082b51