https://levelup.gitconnected.com/breaking-the-chains-of-conditionals-a-journey-into-polymorphic-refactoring-5068b9e08bc5