implemented computeScore(gb, gb) and computeWordScore(w, gb)