Add disconnect function