some knapsack hacks