how to create the view