added 16-bit encode example