updated hasOwnProperty definition