refactored scrabbleScore function using objects