loop diagram generator