state macro