support hook_before_cr