made Java and C++ work with the new hierarchy concept