moved stats.js to own file