replace instanceof with polymorphism in TyphoonInitializer