put state tree example in a single file