added simple knapsack algorithm