construct the connection only when going to use it right away