updated adv trader to check connection first