connection between threads works