how is the president of united states elected