calculate sum if it's not present