changed to class-based views