Changed the function keeping track of consumed goods.