find the sum of a word using objects