update encode again