using _.forIn instead of hasOwnProperty