generateState