adding reconnect method