change codes structure