decoder work in progress