modify a bit
moidfy pareto calc for exer 4-3