encoding and decoding example | ScratchStats