update codes structure