add auto reconnection