main js updated