add tree structure for class inherent relationship