property injection : replace instanceof with polymorphism