added model
some fixes to views.py