nice rewrite