modified deletePost()