begin implementation of dfa package