refactoring; singleton using enums