fixed encode example and ref