adding disconnect packet encoding