add combination sum optimization