density-dependent switching