update comments after clicking corresponding buttons