check hasOwnProperty when assigning fields