But here the legislator intervenes. His job is to attach rewards to socially desirable but individually unattractive actions and punishments to socially undesirable but individually attractive ones so that self-interest will become aligned with the public good. What motivates the legislator to do this? In his early writings, Bentham seems mostly to imagine a hypothetical, single, master-legislator (perhaps himself), who would be one of those rare individuals genuinely motivated by altruism. But for the later Bentham and certainly for James and John Stuart Mill the legislator is replaced by an elected legislature and altruism must be replaced by institutional mechanisms, particularly representation.