narrow the definition of AFD. Add nextState and accept.