added when pattern to nml syntax.