deletePost method