Higher order theories