use EnumMap instead of HashMap