split out ball.js