add / discriminator for classes in the middle of hierarchy