Adding disconnect function.