code for multiobjective (3+ objective functions) case