refactoring app->rapp.