updated main loop to reconnect on disco
removed the commented out old main loop