wrote updatePost query