start refactor of Inventory creation code