CHANGED:applied the category tree view function