Added multi-bit encoding