generateStates() updated.