draft n7: tests implemented. joints reordered as per depth first traversal order