changed knapsack to run better in interactive mode. no changes for existing tests needed