Replacing conditional with polymorphism
Refactoring