What is the purpose of the denominator? Do we need a global scaling here? It causes problems when n = 1.