add comments to sum and return 0 if list is empty