related manager to queryset
fixed some defects, simplified next_trial into next_variant, explicitly wrote out aggregation