change connect method