fixed and simplified hopcroft algo implementation for minimizing dfa