more correct testing ('in', not hasOwnProperty)