implementing check of connect