Add:setter and getter for totalSum