election type and voting function implemented