implemented client-side voting