corrected bug in initialisation
added get_json method to tree
changed the Tree, but the signature is the same