modified the run for local connections