translated compiled index.js to conform