The knapsack problem improved