added connection param to worker main()