more funcitonal knapsack