creating post controller