type hint added for .connect in worker