first version; basic connection/disconnection