function initial_deed_population(db) {
  if (!db) console.log('initial_deed_population something broke...');

  //fetch class deeds and store them
  let class_deeds = deed_fetch_and_store(
    db,
    '/data/class_deeds.json',
    DEED_CATEGORIES.CLASS
  );

  //fetch race deeds and store them
  let race_deeds = deed_fetch_and_store(
    db,
    '/data/race_deeds.json',
    DEED_CATEGORIES.RACE
  );

  //fetch epic deeds and store them
  let soa_deeds = deed_fetch_and_store(
    db,
    '/data/soa_deeds.json',
    DEED_CATEGORIES['SHADOWS OF ANGMAR']
  );
  let mom_deeds = deed_fetch_and_store(
    db,
    '/data/mom_deeds.json',
    DEED_CATEGORIES['THE MINES OF MORIA']
  );
  let aotk_deeds = deed_fetch_and_store(
    db,
    '/data/aotk_deeds.json',
    DEED_CATEGORIES['ALLIES TO THE KING']
  );
  let tsos_deeds = deed_fetch_and_store(
    db,
    '/data/tsos_deeds.json',
    DEED_CATEGORIES['THE STRENGTH OF SAURON']
  );
  let bbom_deeds = deed_fetch_and_store(
    db,
    '/data/bbom_deeds.json',
    DEED_CATEGORIES['THE BLACK BOOK OF MORDOR']
  );

  //fetch reputation deeds and store them
  let rep_deeds = deed_fetch_and_store(
    db,
    '/data/rep_deeds.json',
    DEED_CATEGORIES.REPUTATION
  );

  //fetch overworld deeds and store them
  let eriador_deeds = deed_fetch_and_store(
    db,
    '/data/eriador_deeds.json',
    DEED_CATEGORIES.ERIADOR
  );
  let rhov_deeds = deed_fetch_and_store(
    db,
    '/data/rhov_deeds.json',
    DEED_CATEGORIES.RHOVANION
  );
  let gondor_deeds = deed_fetch_and_store(
    db,
    '/data/gondor_deeds.json',
    DEED_CATEGORIES.GONDOR
  );
  let mordor_deeds = deed_fetch_and_store(
    db,
    '/data/mordor_deeds.json',
    DEED_CATEGORIES.MORDOR
  );

  let skirm_deeds = deed_fetch_and_store(
    db,
    '/data/skirm_deeds.json',
    DEED_CATEGORIES.SKIRMISH
  );

  let soa_inst = deed_fetch_and_store(
    db,
    '/data/soa_inst_deeds.json',
    DEED_CATEGORIES['INSTANCES SHADOWS OF ANGMAR']
  );
  let mom_inst = deed_fetch_and_store(
    db,
    '/data/mom_inst_deeds.json',
    DEED_CATEGORIES['INSTANCES MINES OF MORIA']
  );
  let loth_inst = deed_fetch_and_store(
    db,
    '/data/loth_inst_deeds.json',
    DEED_CATEGORIES['INSTANCES LOTHLORIEN']
  );
  let mirk_inst = deed_fetch_and_store(
    db,
    '/data/mirk_inst_deeds.json',
    DEED_CATEGORIES['INSTANCES MIRKWOOD']
  );
  let ita_inst = deed_fetch_and_store(
    db,
    '/data/ita_inst_deeds.json',
    DEED_CATEGORIES['INSTANCES IN THEIR ABSENCE']
  );
  let isen_inst = deed_fetch_and_store(
    db,
    '/data/isen_inst_deeds.json',
    DEED_CATEGORIES['INSTANCES RISE OF ISENGUARD']
  );
  let ereb_inst = deed_fetch_and_store(
    db,
    '/data/erebor_inst_deeds.json',
    DEED_CATEGORIES['INSTANCES ROAD TO EREBOR']
  );
  let osg_inst = deed_fetch_and_store(
    db,
    '/data/osg_inst_deeds.json',
    DEED_CATEGORIES['INSTANCES ASHES OF OSGILIATH']
  );
  let pel_inst = deed_fetch_and_store(
    db,
    '/data/pel_inst_deeds.json',
    DEED_CATEGORIES['INSTANCES BATTLE OF PELENNOR']
  );

  let seh_deeds = deed_fetch_and_store(
    db,
    '/data/seh_deeds.json',
    DEED_CATEGORIES['SOCIAL, EVENTS, AND HOBBIES']
  );
  let special_deeds = deed_fetch_and_store(
    db,
    '/data/bobb_deeds.json',
    DEED_CATEGORIES.SPECIAL
  );

  return Promise.allSettled([
    class_deeds,
    race_deeds,
    soa_deeds,
    mom_deeds,
    aotk_deeds,
    tsos_deeds,
    bbom_deeds,
    rep_deeds,
    eriador_deeds,
    rhov_deeds,
    gondor_deeds,
    mordor_deeds,
    skirm_deeds,
    soa_inst,
    mom_inst,
    loth_inst,
    mirk_inst,
    ita_inst,
    isen_inst,
    ereb_inst,
    osg_inst,
    pel_inst,
    seh_deeds,
    special_deeds,
  ]);
  // .then(values => {
  //   // console.log('everything loaded fine...');
  // }).catch(error => {
  //   console.error('initial_deed_population something went wrong...', error);
  // })
}
//perform initial deed fetching and storing into the indexeddb
perform initial deed fetching and storing into the indexeddb
perform initial deed fetching and storing into the indexeddb
function initial_deed_population(db) {
  if (!db) console.log('initial_deed_population something broke...');
  let class_deeds = deed_fetch_and_store(
    db,
    '/data/class_deeds.json',
    DEED_CATEGORIES.CLASS
  );
  let race_deeds = deed_fetch_and_store(
    db,
    '/data/race_deeds.json',
    DEED_CATEGORIES.RACE
  );
  let soa_deeds = deed_fetch_and_store(
    db,
    '/data/soa_deeds.json',
    DEED_CATEGORIES['SHADOWS OF ANGMAR']
  );
  let mom_deeds = deed_fetch_and_store(
    db,
    '/data/mom_deeds.json',
    DEED_CATEGORIES['THE MINES OF MORIA']
  );
  let aotk_deeds = deed_fetch_and_store(
    db,
    '/data/aotk_deeds.json',
    DEED_CATEGORIES['ALLIES TO THE KING']
  );
  let tsos_deeds = deed_fetch_and_store(
    db,
    '/data/tsos_deeds.json',
    DEED_CATEGORIES['THE STRENGTH OF SAURON']
  );
  let bbom_deeds = deed_fetch_and_store(
    db,
    '/data/bbom_deeds.json',
    DEED_CATEGORIES['THE BLACK BOOK OF MORDOR']
  );
  let rep_deeds = deed_fetch_and_store(
    db,
    '/data/rep_deeds.json',
    DEED_CATEGORIES.REPUTATION
  );
  let eriador_deeds = deed_fetch_and_store(
    db,
    '/data/eriador_deeds.json',
    DEED_CATEGORIES.ERIADOR
  );
  let rhov_deeds = deed_fetch_and_store(
    db,
    '/data/rhov_deeds.json',
    DEED_CATEGORIES.RHOVANION
  );
  let gondor_deeds = deed_fetch_and_store(
    db,
    '/data/gondor_deeds.json',
    DEED_CATEGORIES.GONDOR
  );
  let mordor_deeds = deed_fetch_and_store(
    db,
    '/data/mordor_deeds.json',
    DEED_CATEGORIES.MORDOR
  );
  let skirm_deeds = deed_fetch_and_store(
    db,
    '/data/skirm_deeds.json',
    DEED_CATEGORIES.SKIRMISH
  );
  let soa_inst = deed_fetch_and_store(
    db,
    '/data/soa_inst_deeds.json',
    DEED_CATEGORIES['INSTANCES SHADOWS OF ANGMAR']
  );
  let mom_inst = deed_fetch_and_store(
    db,
    '/data/mom_inst_deeds.json',
    DEED_CATEGORIES['INSTANCES MINES OF MORIA']
  );
  let loth_inst = deed_fetch_and_store(
    db,
    '/data/loth_inst_deeds.json',
    DEED_CATEGORIES['INSTANCES LOTHLORIEN']
  );
  let mirk_inst = deed_fetch_and_store(
    db,
    '/data/mirk_inst_deeds.json',
    DEED_CATEGORIES['INSTANCES MIRKWOOD']
  );
  let ita_inst = deed_fetch_and_store(
    db,
    '/data/ita_inst_deeds.json',
    DEED_CATEGORIES['INSTANCES IN THEIR ABSENCE']
  );
  let isen_inst = deed_fetch_and_store(
    db,
    '/data/isen_inst_deeds.json',
    DEED_CATEGORIES['INSTANCES RISE OF ISENGUARD']
  );
  let ereb_inst = deed_fetch_and_store(
    db,
    '/data/erebor_inst_deeds.json',
    DEED_CATEGORIES['INSTANCES ROAD TO EREBOR']
  );
  let osg_inst = deed_fetch_and_store(
    db,
    '/data/osg_inst_deeds.json',
    DEED_CATEGORIES['INSTANCES ASHES OF OSGILIATH']
  );
  let pel_inst = deed_fetch_and_store(
    db,
    '/data/pel_inst_deeds.json',
    DEED_CATEGORIES['INSTANCES BATTLE OF PELENNOR']
  );
  let seh_deeds = deed_fetch_and_store(
    db,
    '/data/seh_deeds.json',
    DEED_CATEGORIES['SOCIAL, EVENTS, AND HOBBIES']
  );
  let special_deeds = deed_fetch_and_store(
    db,
    '/data/bobb_deeds.json',
    DEED_CATEGORIES.SPECIAL
  );
  return Promise.allSettled([
    class_deeds,
    race_deeds,
    soa_deeds,
    mom_deeds,
    aotk_deeds,
    tsos_deeds,
    bbom_deeds,
    rep_deeds,
    eriador_deeds,
    rhov_deeds,
    gondor_deeds,
    mordor_deeds,
    skirm_deeds,
    soa_inst,
    mom_inst,
    loth_inst,
    mirk_inst,
    ita_inst,
    isen_inst,
    ereb_inst,
    osg_inst,
    pel_inst,
    seh_deeds,
    special_deeds,
  ]);
}
function initial_deed_population ( db ) { if ( ! db ) console . log ( 'initial_deed_population something broke...' ) ; let class_deeds = deed_fetch_and_store ( db , '/data/class_deeds.json' , DEED_CATEGORIES . CLASS ) ; let race_deeds = deed_fetch_and_store ( db , '/data/race_deeds.json' , DEED_CATEGORIES . RACE ) ; let soa_deeds = deed_fetch_and_store ( db , '/data/soa_deeds.json' , DEED_CATEGORIES [ 'SHADOWS OF ANGMAR' ] ) ; let mom_deeds = deed_fetch_and_store ( db , '/data/mom_deeds.json' , DEED_CATEGORIES [ 'THE MINES OF MORIA' ] ) ; let aotk_deeds = deed_fetch_and_store ( db , '/data/aotk_deeds.json' , DEED_CATEGORIES [ 'ALLIES TO THE KING' ] ) ; let tsos_deeds = deed_fetch_and_store ( db , '/data/tsos_deeds.json' , DEED_CATEGORIES [ 'THE STRENGTH OF SAURON' ] ) ; let bbom_deeds = deed_fetch_and_store ( db , '/data/bbom_deeds.json' , DEED_CATEGORIES [ 'THE BLACK BOOK OF MORDOR' ] ) ; let rep_deeds = deed_fetch_and_store ( db , '/data/rep_deeds.json' , DEED_CATEGORIES . REPUTATION ) ; let eriador_deeds = deed_fetch_and_store ( db , '/data/eriador_deeds.json' , DEED_CATEGORIES . ERIADOR ) ; let rhov_deeds = deed_fetch_and_store ( db , '/data/rhov_deeds.json' , DEED_CATEGORIES . RHOVANION ) ; let gondor_deeds = deed_fetch_and_store ( db , '/data/gondor_deeds.json' , DEED_CATEGORIES . GONDOR ) ; let mordor_deeds = deed_fetch_and_store ( db , '/data/mordor_deeds.json' , DEED_CATEGORIES . MORDOR ) ; let skirm_deeds = deed_fetch_and_store ( db , '/data/skirm_deeds.json' , DEED_CATEGORIES . SKIRMISH ) ; let soa_inst = deed_fetch_and_store ( db , '/data/soa_inst_deeds.json' , DEED_CATEGORIES [ 'INSTANCES SHADOWS OF ANGMAR' ] ) ; let mom_inst = deed_fetch_and_store ( db , '/data/mom_inst_deeds.json' , DEED_CATEGORIES [ 'INSTANCES MINES OF MORIA' ] ) ; let loth_inst = deed_fetch_and_store ( db , '/data/loth_inst_deeds.json' , DEED_CATEGORIES [ 'INSTANCES LOTHLORIEN' ] ) ; let mirk_inst = deed_fetch_and_store ( db , '/data/mirk_inst_deeds.json' , DEED_CATEGORIES [ 'INSTANCES MIRKWOOD' ] ) ; let ita_inst = deed_fetch_and_store ( db , '/data/ita_inst_deeds.json' , DEED_CATEGORIES [ 'INSTANCES IN THEIR ABSENCE' ] ) ; let isen_inst = deed_fetch_and_store ( db , '/data/isen_inst_deeds.json' , DEED_CATEGORIES [ 'INSTANCES RISE OF ISENGUARD' ] ) ; let ereb_inst = deed_fetch_and_store ( db , '/data/erebor_inst_deeds.json' , DEED_CATEGORIES [ 'INSTANCES ROAD TO EREBOR' ] ) ; let osg_inst = deed_fetch_and_store ( db , '/data/osg_inst_deeds.json' , DEED_CATEGORIES [ 'INSTANCES ASHES OF OSGILIATH' ] ) ; let pel_inst = deed_fetch_and_store ( db , '/data/pel_inst_deeds.json' , DEED_CATEGORIES [ 'INSTANCES BATTLE OF PELENNOR' ] ) ; let seh_deeds = deed_fetch_and_store ( db , '/data/seh_deeds.json' , DEED_CATEGORIES [ 'SOCIAL, EVENTS, AND HOBBIES' ] ) ; let special_deeds = deed_fetch_and_store ( db , '/data/bobb_deeds.json' , DEED_CATEGORIES . SPECIAL ) ; return Promise . allSettled ( [ class_deeds , race_deeds , soa_deeds , mom_deeds , aotk_deeds , tsos_deeds , bbom_deeds , rep_deeds , eriador_deeds , rhov_deeds , gondor_deeds , mordor_deeds , skirm_deeds , soa_inst , mom_inst , loth_inst , mirk_inst , ita_inst , isen_inst , ereb_inst , osg_inst , pel_inst , seh_deeds , special_deeds , ] ) ; }
perform initial deed fetching and storing into the indexeddb
perform initial deed fetching and storing into the indexeddb
//fetch class deeds and store them //fetch race deeds and store them //fetch epic deeds and store them //fetch reputation deeds and store them //fetch overworld deeds and store them // .then(values => { //   // console.log('everything loaded fine...'); // }).catch(error => { //   console.error('initial_deed_population something went wrong...', error); // })