made decoder.rs independent of new modes