made a connect method