add score weighting and return total as json