added a view and method in the controller for the index