making app.php more generic