calculate norms