changes in index and js file