use state_name instead of state consistently