refactoring
first steps towards enum support