new main js fns