main js and index html files edited for further use