complete rewrite of the inventory