keep track of state in consumer