change index method of view.py