refactoring controller : use app.param