Update encoding procedure