added generator state listener