support for enumerated classes
refactor