moved sopt to global variable

added -v option to print inforomations on connections