How vacancies are filled in state legislatures