connect method