added reconnect and status check.