The functions of institutions: etiology and teleology