Added Brian's changes to views.py

It keeps causing problems