since `id` ranges from 0 to 7 continuously, you can also use a static array with a length of 8 for mapping. `array[id]` could be bit faster than `switch`. just suggestion