Changed the format of the view class function.