added connect method