correct normalization of Nd code