Added lightstate generator