connect and disconnect now working