add hasOwnProperty check inside for in loops
update minified version