updated reconnection logic