js version of tree with branches

yep