rename
make enumToIdx private since its unsafe