Add outline for AD loop