replace repl with explicit connection