New decoder implementation