repair js for new file structure