update comment function