changed inheritance relations on each class