% compute the nominator and denominator