add hasOwnProperty check