WIP with SO fix

note to self: never use for ... in JS as that iterates through attribute
NAMES not values