Replace case with strategy refactoring