add vote functionality to template