removed inline
Added an override for the sum() function