The second law of thermodynamics applied