add auto reconnect option