moved states parser to after the tree loader