implement dagmodifier and tests.