tune enum generation
add comments