refactored and added unobtrusive JS when voting