-optimize inheritances