refactor to two inventories