added disconnect command and synchronization