refactor enumeration scheme