Implemented a NFA