side_effect_assert refactor