add close for hand shake