added hasOwnProperty checks