refactor blog_controller