updated sumfactorial