Added more faster method for construction all combinations.