used inject for the sum