decoder, switch and vec snippets