getSum method added to Vector class