client side js for the tree, interim