reformatted views.py