pareto working, functions updated