Design of political and legal institutions