Added dfa package and function