added hasOwnProperty to for-in loops