modification from combination-sum