Simple encode example