added disconnect support