Added 'toDecoded' function.