"Pleasures then, and the avoidance of pains, are the ends that the legislator has in view." In Chapter VII, Bentham says: "The business of government is to promote the happiness of the society, by punishing and rewarding.... In proportion as an act tends to disturb that happiness, in proportion as the tendency of it is pernicious, will be the demand it creates for punishment." Principle of utility Bentham's work opens with a statement of the principle of utility: Hedonic calculus In Chapter IV, Bentham introduces a method of calculating the value of pleasures and pains, which has come to be known as the hedonic calculus. Bentham says that the value of a pleasure or pain, considered by itself, can be measured according to its intensity, duration, certainty/uncertainty and propinquity/remoteness. In addition, it is necessary to consider "the tendency of any act by which it is produced" and, therefore, to take account of the act's fecundity, or the chance it has of being followed by sensations of the same kind and its purity, or the chance it has of not being followed by sensations of the opposite kind. Finally, it is necessary to consider the extent, or the number of people affected by the action. Evils of the first and second order The question then arises as to when, if at all, it might be legitimate to break the law. This is considered in The Theory of Legislation, where Bentham distinguishes between evils of the first and second order. Those of the first order are the more immediate consequences; those of the second are when the consequences spread through the community causing "alarm" and "danger". It is true there are cases in which, if we confine ourselves to the effects of the first order, the good will have an incontestable preponderance over the evil. Were the offence considered only under this point of view, it would not be easy to assign any good reasons to justify the rigour of the laws. Every thing depends upon the evil of the second order; it is this which gives to such actions the character of crime, and which makes punishment necessary. Let us take, for example, the physical desire of satisfying hunger. Let a beggar, pressed by hunger, steal from a rich man's house a loaf, which perhaps saves him from starving, can it be possible to compare the good which the thief acquires