add Connect middleware