A modification on app.c