added connect and disconnect