implement old vs new side by side encoding to test for correctness