document loop B