update comment logic