new update code and update to reconnect logic