split app.js in three parts