now reconnecting if connection is lost. see issue #2