added autoreconnect