better fix for selected ports, added variable config example to examples