testing connectionCheck() function