         k = expr->dim[0];
     }
 
-    //printf("start\n");
-    //fflush(stdout);
-    //if(prev_layer->type==MAXPOOL){
-    //printf("i: %zu k: %zu\n",i,k);
-    //expr_print(prev_neurons[k]->expr);
-    //fflush(stdout);
-    //}
-    if(prev_neurons[k]->expr->size == 0)
-    {
-        res = multiply_cst_expr(prev_neurons[k]->expr, expr->inf_coeff[0], expr->sup_coeff[0]);
+    if(neurons[k]->expr->size == 0)
+    {
+        res = multiply_cst_expr(neurons[k]->expr, expr->inf_coeff[0], expr->sup_coeff[0]);
     }
     else
     {
-        res = multiply_expr(prev_neurons[k]->expr, expr->inf_coeff[0], expr->sup_coeff[0]);
+        res = multiply_expr(neurons[k]->expr, expr->inf_coeff[0], expr->sup_coeff[0]);
     }
 
     for(size_t i = 1; i < in_num_neurons; i++)

}

__device__ __host__
double compute_ub_from_expr(expr_t* expr, const fppoly_t* const fp)
{
    if((fp->input_lexpr != nullptr) && (fp->input_uexpr != nullptr))
    {
        expr = replace_input_poly_cons_in_uexpr(expr, fp);
    }

    double res_sup = expr->sup_cst;

{
    const size_t numlayers = fp->numlayers;
    expr_t* lexpr = expr;
    expr_t** lexpr_ptr = &lexpr;
    fppoly_internal_t* pr = fppoly_init_from_manager(man, ELINA_FUNID_ASSIGN_LINEXPR_ARRAY);

    for(int k = numlayers - 1; k >= 0; k--)
    {
        neuron_t** aux_neurons = fp->layers[k]->neurons;

        if(fp->layers[k]->type != MAXPOOL)
        {
            if(fp->layers[k]->activation == RELU)
            {
                lexpr_replace_relu_bounds(lexpr_ptr, aux_neurons);
            }

            expr_from_previous_layer(lexpr_ptr, aux_neurons);
        }
        else
        {
            lexpr_replace_maxpool_bounds(lexpr_ptr, aux_neurons);
        }
    }

    return compute_lb_from_expr(lexpr, fp->input_inf, fp->input_sup, fp->input_lexpr, fp->input_uexpr);
}

bool is_greater(elina_manager_t* man, elina_abstract0_t* element, const elina_dim_t y, const elina_dim_t x)
