modify the algorithm of combination