crud operation implemented for posts