sort votes in votes table