reviving that age old code I wrote once for Greedy Knapsack :P