Added updateCombinations function