medium rewrite, more regex~~~