changeGreedy and changeDP working