added return type to connect method