refactoring CaseDeocoder