won't try to connect twice in parrallel, but some refactoring is needed for better robustness