revised the reconnect mechanism