enum test refactored