Economic theory of teams