added function MaxDecodingNonUniq