added the update of sum on various activity.