added disconnect function
added disconnect