change js file structure