added text decoding