working on handling disconnects