code: function (json, callback) {
          //validate input
          if (!inputValidation(json)) {
              var inputError = new SearchError('invalid input');
              callback(undefined, inputError);
              return;
          }
          var number = json.number;
          //mongodb api here, then handle the response from mongodb
          database.getSentimentTimeframe(json.startDate, json.endDate, function (json, err) {
              if (err) {
                  callback(undefined, err);
              } else {
                  var res = calculateTopSum(json, number, ["posSum"]);
                  callback(res);
              }
          });
      }
docs: /*
  returns Array of names, which are most loved. with length=number. Ordered!
  Input:
  {
  "number" : 3,  //this is the count of how many you want e.g. 3 for top3
  "startDate' : "ISODate",
  "endDate' : "ISODate"