short example encodes and decodes correctly