update comments function