reduce state optimization