Added method to update inventory