improve memory efficency in numerator