slow version of combination_sum2