let rec upper_acc levs ie acc=
match levs with
| [] -> acc
| lev::tl ->
begin match (pi lev ie) with
| Event input ->
upper_acc tl ie (List.append acc [lev])
| Suppress -> upper_acc tl ie acc
end