refactor inventario