moved data={} into function scope, bomdata.json must contain empty object