New version of view.py