states generation