changed normalization function syntax