update postComment function