update this to use am/dag files independently