move vote functions to back-end