debugging check connection function