working version with class based views that replaced function based views