remove trie for isFormat, unrolled ifs do jus fine