The effect of the election of prosecutors on criminal trials