udpate encoding