add deletePost function