add decoding method