added update post method