connect method implemented