index.js formats the data correctly for the webservice