implemented connection check