Three laws of thermodynamics