Helper Function Template

Template for sum