add disconnection support