adding index, and modifiing web.js