app.js added buffering