added missing data parameter in index.js