added state selector