added transition, implemented hashing for state sets