implement a new decoder that respects binary encoding