step 5: the view functions