changed obj-c client to allow for dynamic tree structure