corrected some declarations in computeScore function