modify convert naf to dfa method