implements enum generation