update normalizing code