add encode setting