rewrite slim