created a function to deliever the views