to avoid UI freezing, add the ability to run the connection in a separate queue / thread