my changes, compatible with Menhir