refactored disconnect method
Refactoarrring