adding connect method