Moreover, the ego has the task of bringing the influence of the external world to bear upon the id and its tendencies, and endeavours to substitute the reality-principle for the pleasure-principle which reigns supreme in the id. In the ego perception plays the part which in the id devolves upon instinct.