re-implemented sum() natively - much faster