added a check connectivity method but haven't actually tested it.