added code for learning enumerated types