get categories for  tree