made views for index and detail page