main js and index