move js script to files