reading states and parsing transitions