def get_ordered_entries(self, queryset=False):
        if queryset:
            self.queryset = queryset
        else:
            self.queryset = EntryCategory.objects.all()
        if self.queryset:
            for category in self.queryset:
                entries = category.get_entries()
                if entries:
                    amount_list = [e.amount_of_views for e in entries]
                    rating_list = [e.rating() for e in entries]
                    views_per_entry = fsum(amount_list) / len(amount_list)
                    rating_per_entry = fsum(rating_list) / len(rating_list)
                    category.last_rank = views_per_entry * rating_per_entry
                    category.save()
                else:
                    self.queryset = self.queryset.exclude(pk=category.pk)
            self.queryset = sorted(self.queryset, key=lambda c: c.last_rank,
                                   reverse=True)
        return self.queryset