gate working in midic, sort out loop/gate relations next