added state-changed event