moves JS to require