vers. 1.0.0.8 - with knapsack problem