edited index and js