use call_user_func to call custom function with the app->request as parameter