modifying the view function for the get_page function