Fixed private sum to incorporate data, and added debug statements.