rewrote refreshInventory