implemented disconnection