update the post method