added view() to thread_controller.php