pull to separate js file