Updated To use Text instead of string in decode