add scene graph free function