     expr_t** lexpr_array = (expr_t**) malloc(num_out_neurons*sizeof(expr_t*));
     expr_t** uexpr_array = (expr_t**) malloc(num_out_neurons*sizeof(expr_t*));
 
-    for(size_t i = 0; i < num_out_neurons; i++)
-    {
-        lexpr_array[i] = copy_expr(out_neurons[i]->expr);
-        uexpr_array[i] = copy_expr(out_neurons[i]->expr);
-    }
+    layer_copy_exprs(out_neurons, lexpr_array, uexpr_array, num_out_neurons);
 
     for(int k = layerno - 1; k >= 0; k--)
     {


    return abstract0_of_fppoly(man, res);
}


void fppoly_add_new_layer(fppoly_t* const fp, const size_t size, const layertype_t type, const activation_type_t activation)

    expr->inf_coeff = (double*) malloc(size*sizeof(double));
    expr->sup_coeff = (double*) malloc(size*sizeof(double));

    expr->dim = nullptr;
    expr->size = size;
    expr->inf_cst = -cst;
    expr->sup_cst = cst;
