Book IA - move code to the normalize function