add preconditions to check agg depth