Use class-based view instead of funciton-based view