added weighted sum greedy