index.js in client side written