still some bugs in decoding_mdr_I(), maybe in encoding_mdr_I()