implemented views and template to vote
refactored to use generic views