updated post controller