separate controller from app.js