added counter for inventory