Added connect method.