added diagonal normalization