Changed the normalization to be a function.