created function sum()