Legislatures and factions