doh, only iterate hasOwnProperty as pointed out by John-David Dalton