let rec insert_new_level_acc (lev: level)  (ls: level list) (acc: level list) =      
        match ls with 
        | [] -> acc
        | lev'::tl -> 
            (* We already know that lev is not in the ls list *)                        
             if (leq lev' lev) then 
                     insert_new_level_acc lev tl (List.append acc [lev'])                               
             else (List.append acc (lev::ls))