update the codes