connect and disconnect by drag