rewrite slightly