Refacotr the view by extract a method into model.