[Task#3][ViviHuang&EasonLiu][refactor app.rb]