make checkConnection() public for tests