updated TreeNodesHelper.php