minor refactor
guard against combinatorial explosion