rewrite zs_case