changed how we store the elements on the knapsack
fixed heap overflow