New version, add before_case and after_case