minor rewrite