tile generation in app.js