NFA construction