re-org of var checking and naming; revert out of partil update on xx