refactoring enum message