added post controller functionality