Switch BEGIN/END to ENTER/EAVE