changed the name of main js function