Added setstate example