Added hasConnection method