added local way to compute normalization