fixed how var names determined