added sort_by_votes to index view