changes to the disconnect method