Connect/Disconnect Logic added