1. traverse nfa