better data handling in app routes