added check connection