remove duplicate disconnect method, use an IIFE for connecting