chat and discovery: added shutdown method