updated post controller.