move connection outside devices loop, try again