solved ex2
solve bag_more_functions