defaulted sum function to zero if no paramters are passed to id