Density modification: theory and practice