Working version of ILA, efficient kCombinations algorithm